package com.quan.TemplateEditor.dao;

import com.quan.TemplateEditor.entity.WorkDef;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author southgis
 */
@Repository
public interface IWorkDefDao extends JpaRepository<WorkDef, String>, JpaSpecificationExecutor<WorkDef> {
    /**
     *
     * @return
     */
    @Query(value = "select id,code,codefield from main.SYS_WORKDEF",nativeQuery = true)
    Map<String, Object> findbyName();

    /**
     *
     * @return
     */
    List<WorkDef> findAll();
}
